//
//  XLVoiceConverter.h
//  XLAudioFormatConvertTool
//
//  Created by 10150820867@qq.com on 09/02/2022.
//  Copyright (c) 2022 10150820867@qq.com. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFAudio/AVFAudio.h>
#import <AVFoundation/AVFoundation.h>

AVF_EXPORT AVFileType const AVFileTypeOpus API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), watchos(1.0));

/**
 
 AVFormatIDKey: @(kAudioFormatLinearPCM),
 AVSampleRateKey: @(8000.0),
 AVNumberOfChannelsKey: @(1),
 AVAudioFileTypeKey:@(kAudioFileWAVEType),
 AVEncoderBitDepthHintKey: @(16),
 AVEncoderAudioQualityKey: @(AVAudioQualityHigh)
 */
@interface XLVoiceConverter : NSObject


/// 音频转码
/// - Parameters:
///   - inputFilePath: 源文件地址
///   - inputFileType: 源文件编码类型
///   - outputFilePath: 输出文件地址
///   - outputFileType: 输出文件类型
///   - outputSampleRate: 转码采样率
///   - outputSampleBits: 转码位深
///   - outputChannels: 转码通道数

+ (BOOL)inputFilePath:(NSString *)inputFilePath
        inputFileType:(NSString *)inputFileType
       outputFilePath:(NSString *)outputFilePath
       outputFileType:(NSString *)outputFileType
     outputSampleRate:(NSString *)outputSampleRate
     outputSampleBits:(NSString *)outputSampleBits
       outputChannels:(NSString *)outputChannels;

@end
